<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>报备</title>
    <link rel="stylesheet" type="text/css" href="__CSS__/api.css"/>
    <link rel="stylesheet" type="text/css" href="__CSS__/aui.css"/>
    <link href="__JSS__/plugins/layui/css/layui.css" rel="stylesheet">
    <style>
        .aui-bar-nav .aui-pull-left{
            padding-left: 0;
        }
        .aui-iconfont-tu{
            min-height: 2.8rem;
            width: 2.2rem;
            background: url(__IMG__/back.png) no-repeat center center;
            background-size: 44px 44px;
        }
        .tit{
            padding:0.75rem 0.8rem;
            align-items: center;
            font-size: 14px;
            font-weight: 500;
            color: #000000;
        }
        .xian{
            width: 3px;
            height: 14px;
            background: #62C3D0;
            margin-right:0.35rem;
        }
        .box{
            background-color: #fff;
            padding-left: 0.8rem;
        }
        .one{
            height:3.2rem;
            align-items: center;
            font-size: 14px;
            font-weight: 400;
            color: #242424;
        }
        .one textarea{
            height: 100px;width: 100%;padding: 1px 5px;background-color: #fff;border: 1px solid #DBCFDB;
        }
        .red{
            color: #F24860;
        }
        input[type="text"],input[type="tel"] {
            border: none;
            width: 100%;
            padding: 0 0.75rem;
            line-height: normal;
            font-size: 0.8rem;
            border-radius: 0;
            background-color:transparent;
            margin: 0 auto;
            color: #A6A6A6;
            text-align: right;
        }
        ::-webkit-input-placeholder {
            color: #A6A6A6;
        }
        .button{
            padding:1rem 2.45rem;
        }
        .btn{
            text-align: center;
            line-height: 1.8rem;
            height: 1.8rem;
            background: #62C3D0;
            border-radius: 0.9rem;
            font-size: 16px;
            font-weight: 500;
            color: #FFFFFF;
        }


    </style>
</head>

<body id="body">
<header class="aui-bar aui-bar-nav underLine" id="header">
    <a class="aui-pull-left" tapmode="active" onclick="history.go(-1)"> <span class="aui-iconfont aui-iconfont-tu"> </span> </a>
    <div class="aui-title">报备</div>
</header>
{if $userInitInfo.user_submit == 1}
<br/>
&nbsp;&nbsp;&nbsp;&nbsp;您没有报备权限，请联系管理员开通！
{else /}
<form id="addShop">
<div class="tit flex-wrap">
    <span class="xian"></span>
    <div>基本信息</div>
</div>
<div class="box">

    <div class="one flex-wrap underLine">
        <div><span class="red">*</span>报备日期</div>
        <input type="text" name="s_time" class="flex-con" placeholder="默认当天日期" value="<?php echo date('Y-m-d'); ?>" readonly>
    </div>
    <div class="one flex-wrap underLine">
        <div><span class="red">*</span>有效日期</div>
        <input type="text" name="s_endtime" class="flex-con" placeholder="后台自动生成的日期" value="<?php echo date('Y-m-d',time()+(3600*24*20)); ?>" readonly>
    </div>
    <div class="one flex-wrap underLine">
        <div><span class="red">*</span>公司老师</div>
        <input type="text" name="s_inside_name" class="flex-con" placeholder="请输入姓名" value="{$oldData.s_inside_name}">
    </div>
    <div class="one flex-wrap underLine">
        <div><span class="red">*</span>公司老师电话</div>
        <input type="tel" name="s_inside_phone" class="flex-con" placeholder="请输入电话" value="{$oldData.s_inside_phone}">
    </div>
</div>
<div class="tit flex-wrap">
    <span class="xian"></span>
    <div>联系信息</div>
</div>

<div class="box">
    <div class="one flex-wrap underLine">
        <div><span class="red">*</span>店名/地名</div>
        <input type="text" name="s_com_name" class="flex-con" placeholder="请输入店名" value="{$oldData.s_com_name}">
    </div>
</div>
<div class="box">
    <div class="one flex-wrap underLine">
        <div><span class="red">*</span>联系人</div>
        <input type="text" name="s_name" class="flex-con" placeholder="请输入名称" value="{$oldData.s_name}">
    </div>
    <div class="one flex-wrap underLine">
        <div>微信号</div>
        <input type="text" name="s_wx_name" class="flex-con" placeholder="请输入微信号" value="{$oldData.s_wx_name}">
    </div>
    <div class="one flex-wrap underLine">
        <div><span class="red">*</span>联系电话</div>
        <input type="text" name="s_phone" class="flex-con" placeholder="请输入电话" value="{$oldData.s_phone}">
    </div>
    <div class="one flex-wrap underLine">
        <div>联系电话2</div>
        <input type="text" name="s_phone1" class="flex-con" placeholder="请输入电话" value="{$oldData.s_phone1}">
    </div>
    <div class="one flex-wrap underLine">
        <div>联系电话3</div>
        <input type="tel" name="s_phone2" class="flex-con" placeholder="请输入电话" value="{$oldData.s_phone2}">
    </div>
    <input type="hidden" name="s_type" value="1" />
    <!--<div class="one flex-wrap underLine">-->
        <!--<div><span class="red">*</span>类型</div>-->
        <!--<div style="padding-left: 30px">-->
            <!--<input type="radio" name="s_type" class="flex-con" value="1" checked readonly id="nan"><label for="nan"> 花样青青</label>&nbsp;&nbsp;&nbsp;&nbsp;-->
            <!--<input type="radio" name="s_type" class="flex-con" value="2" readonly id="nv"><label for="nv"> 美肤主角</label>-->
        <!--</div>-->
    <!--</div>-->
    <div class="one flex-wrap underLine">
        <div><span class="red">*</span>沟通要点</div>
    </div>
    <div class="one flex-wrap underLine" style="margin-right: 20px;">
        <textarea name="s_content" class="flex-con" placeholder="沟通要点不得少于50字">{$oldData.s_content}</textarea>
    </div>
    <br/>
    <div class="one flex-wrap underLine">
        <div>备注信息</div>
    </div>
    <div class="one flex-wrap underLine" style="margin-right: 20px;">
        <textarea name="s_remark" class="flex-con" placeholder="备注信息不得少于50字">{$oldData.s_remark}</textarea>
    </div>
</div>
<br/>
</form>
<div class="button">
    <div class="btn">下一步</div>
</div>
{/if}
</body>
{include file="public/footer" /}
</html>
<script type="text/javascript" src="__JS__/wk.js"></script>
<script type="text/javascript">
    $('.btn').click(function () {
        $.ajax({
            url: '/index/Addshop/firstStep',
            data: $('#addShop').serialize(),
            type: 'POST',
            dataType: 'JSON',
            success: function (returnData) {
                if(returnData.status == 200){
                    location.href = '{:url("index/Addshop/goAddress")}';
                }else{
                    layer.open({
                        content: returnData.msg
                        ,skin: 'msg'
                        ,time: 2 //2秒后自动关闭
                    });
                }
            },
            error: function () {
                alert('服务器错误，请刷新重试！');
            }
        })
    });
</script>

